<template>
  <div class="error-page">
    <div class="flex flex-col items-center justify-center h-screen">
      <div class="error-code text-8xl font-bold text-primary mb-6">404</div>
      <h1 class="text-3xl font-bold mb-4">页面未找到</h1>
      <p class="text-gray-500 text-lg mb-8">很抱歉，您访问的页面不存在或已被删除</p>
      <div class="flex gap-4">
        <el-button type="primary" @click="goHome">
          <el-icon class="mr-1"><HomeFilled /></el-icon>返回首页
        </el-button>
        <el-button @click="goBack">
          <el-icon class="mr-1"><Back /></el-icon>返回上一页
        </el-button>
      </div>
    </div>
  </div>
</template>

<script>
import { useRouter } from 'vue-router'
import { HomeFilled, Back } from '@element-plus/icons-vue'

export default {
  name: 'Error404',
  components: {
    HomeFilled,
    Back
  },
  setup() {
    const router = useRouter()
    
    // 返回首页
    const goHome = () => {
      router.push('/')
    }
    
    // 返回上一页
    const goBack = () => {
      router.go(-1)
    }
    
    return {
      goHome,
      goBack
    }
  }
}
</script>

<style scoped>
.error-page {
  background-color: var(--bg-color);
  min-height: 100vh;
  text-align: center;
}

.error-code {
  font-size: 120px;
  background: linear-gradient(45deg, var(--el-color-primary), var(--el-color-success));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1);
}
</style> 